﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DocumentStorage.EFRepository.Interfaces;
using DocumentStorage.Models;
using DocumentStorage.Services.Interfaces;

namespace DocumentStorage.Services.Services
{
  public class DocumentPersistanceService : IDocumentPersistanceService
  {
    private IDocumentRepository _documentRepository;

    public DocumentPersistanceService(IDocumentRepository documentRepository)
    {
      _documentRepository = documentRepository;
    }

    public void CreateDocument(Document document)
    {
      _documentRepository.Create(document);
    }

    public Document GetDocument(int id)
    {
      return _documentRepository.GetDocument(id);
    }
  }
}
